/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __RESOURCE_LOADER_H__
#define __RESOURCE_LOADER_H__

#include "GameObject.h"

namespace PQEngine
{
	enum SceneRenderQueueGroupID
	{
		SCENE_RENDER_QUEUE_STAR_FIELD       = Ogre::RENDER_QUEUE_SKIES_EARLY + 0,
		SCENE_RENDER_QUEUE_MOON_BACKGROUND = Ogre::RENDER_QUEUE_SKIES_EARLY + 1,
		SCENE_RENDER_QUEUE_SKY_DOME         = Ogre::RENDER_QUEUE_SKIES_EARLY + 2,
		SCENE_RENDER_QUEUE_MOON            = Ogre::RENDER_QUEUE_SKIES_EARLY + 3,
		SCENE_RENDER_QUEUE_SUN             = Ogre::RENDER_QUEUE_SKIES_EARLY + 4,
		SCENE_RENDER_QUEUE_CLOUDS          = Ogre::RENDER_QUEUE_SKIES_EARLY + 5,
		SCENE_RENDER_QUEUE_GROUND_FOG      = Ogre::RENDER_QUEUE_SKIES_EARLY + 6,
	};

	

	enum SceneResourceLocation
	{
		LOC_FILE_SYSTEM,//local file system
		LOC_MPQ_ARCHIVE,
		LOC_GPACK_ARCHIVE,//our homemade archive system
	};
	enum SceneResourceType
	{
		SCENE_RESOURCE_UNKNOWN,
		SCENE_RESOURCE_MESH,
		SCENE_RESOURCE_SCRIPT_CSHARP,
		SCENE_RESOURCE_ZIP,
		SCENE_RESOURCE_FILE_BLEND,
		SCENE_RESOURCE_M2_MODLE,//blizzard m2 model
	};

	/*None ogre native resource resource format load interface.
		@remark
		None Ogre native resource load implementation should inherit this class.
	*/
	class SceneResourceLoadImpl
	{
	public:
		SceneResourceLoadImpl(SceneObject* sceneObject, std::string path,SceneResourceLocation loc=LOC_FILE_SYSTEM)
			: _sceneObject(sceneObject),_path(path),_loc(loc)
		{
		}
		virtual GameObject* load()=0;//must implement this
	protected:
		SceneResourceLocation _loc;
		SceneObject* _sceneObject;
		std::string _path;
	};

}
#define SResourceLoader PQEngine::ResourceLoader::getSingleton() 
#endif
